<% include ../pageHeader %>
<%
let strPageLinks = helper.generatePageLinks(intEntryCount, intEntryPerPage, intCurrentPage, 15, strURLPrefix);
%>
<div id="mainWrapper">
    <div id="content" class="content">
        <div id="innerContent">
            <% if(theCache.settings["announceShow"] == 1 && intCurrentPage == 1){ %>
                <div class="announce">
                    <div class="announce-content">
                        <div class="announce-time"><%= theCache.settings["announceDate"] %></div>
                        <% if(theCache.settings["announceUBBFlags"] == "html"){ %>
                            <%- theCache.settings["announce"] %>
                        <% }else{ %>
                            <%- ubb.toHTML(helper.HTMLEncode(theCache.settings["announce"]),
                                    theCache.settings["announceUBBFlags"]) %>
                        <% } %>
                        <br/>
                    </div>
                </div>
            <% } %>
            <div class="article-top">
                <div class="view-mode"><%= __('view_mode') %>: <a href="?mode=normal"><%= __('normal') %></a> | <a
                            href="?mode=list"><%= __('list') %></a></div>
                <div class="pages">
                    <% if(intCategory){ %>
                        <%= __('category') %>: <%= helper.HTMLEncode(theCache.getCategoryByID(intCategory).name) %> |
                    <% } %>
                    <% if(intYear){ %>
                        <% if(intMonth){ %>
                            <%= __('month_') + intMonth %>,
                        <% } %>
                        <%= intYear %> |
                    <% } %>
                    <% if(input["q"]){ %>
                        <%= __('search') %>: <%= helper.HTMLEncodeLite(input["q"]) %> |
                    <% } %>
                    <%- strPageLinks %>
                </div>
            </div>
            <%
            if(intEntryCount == 0){
            %>
                <div class="no-entry">
                    <div class="no-entry-message">
                        <%= __('no_article') %>
                    </div>
                </div>
            <%
            }else{
                if (viewMode == 1) {
            %>
                <% include list { arrArticle, arrKeywords } %>
            <%    } else { %>
                    <% include normal { arrArticle, arrKeywords } %>
            <%    }
            }
            %>
            <div class="article-bottom">
                <div class="pages">
                    <%- strPageLinks %>
                </div>
            </div>
        </div>
    </div>
    <% include ../sidebar %>
    <div class="clear"></div>
</div>
<% include ../pageFooter %>
